<?
$smarty=new Smarty();
if(!ANTIHACK) die("ANTIHACK...");

	$q=query("select * from other where code='popup'");
	$r=fetch($q);
	
	if($r["content1"]==1 && $r["content2"]!="" && strpos("a".$_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST'])<1)
	{
		$data["link"]=$r["content2"];
		$e=explode("|",$r["content3"]);
		$data["top"]=$e[0];
		$data["autoclose"]=$e[1];
		if($data["top"]=="") $data["top"]=0;
		if($data["autoclose"]=="") $data["autoclose"]=5000;
		$smarty->assign("data",$data);
		$smarty->display("popup.htm");
	}
?>